from db_utils import D

if __name__ == '__main__':
    utils = D("test")
    sql = "insert into stu values(%s,%s,%s,%s,%s)"
    paramsList = [1, "老张", 20, 1991, "北京市海淀区"]
    # 修改条数
    utils.update(sql, paramsList)

    sql = "update stu set name = %s where id =%s"
    params = ["老王", 1]
    n= utils.update(sql, params)
    print(n)